import matplotlib.pyplot as plt
import numpy as np

import sys

x=[4, 6, 8, 12]
y = [76, 158, 400, 670]
m,b = np.polyfit(x, y, 1)

if len(sys.argv) > 1:
    i = int(sys.argv[1])
    print(m * i + b)

plt.plot(x, y)
plt.show()